<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        ul {
            width: 600px;
            margin: 100px;
        }
        ul li {
            list-style: none;
            width: 200px;
            height: 50px;
            perspective: 500px;
        }
        .box {
            position: relative;
            width: 100%;
            height: 100%;
            transform-style: preserve-3d;
            transition: all .4s;
        }
        .front,.bottom {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            line-height: 50px;
            text-align: center;
        }
        .box .front {
            background-color: pink;
            z-index: 1;
            transform: translateZ(25px);
        }
        .box .bottom {
            background-color: purple;
            transform:translateY(25px) rotateX(-90deg);
        }
        .box:hover {
            transform: rotateX(90deg);
        }
    </style>
</head>
<body>
    <ul>
        <li>
            <div class="box">
                <div class="front">黑马</div>
                <div class="bottom">前端</div>
            </div>
        </li>
    </ul>
</body>
</html>